package springlearn.factory;

public class WeaponFactory {
  public static Weapon get(String WeaponType){
      if(WeaponType.equals("tank")){
          return new Tank();
      }else if(WeaponType.equals("knife")){
          return new Knife();
      }else{
          return null;
      }
  }
}
